<?

require_once("com/borderwaitmaps/entity/CustomsOffice.php");

class CustomsOfficeParser
{
	
	private $customsOffice;
	
	/**
	 * Parses JSON data to/from a CustomsOffice
	 */
	public function CustomsOfficeParser()
	{
		$this->city = new CustomsOffice();		
	}
	
	public function unmarshall($data)
	{
		$this->customsOffice->setId ( $data->id );
		$this->customsOffice->setCity( $data->city );
		return $this->customsOffice;
	}
	
	public function marshall( $customsOffice )
	{
		// output as json
		$data;
		$data->class = "CustomsOffice";
		$data->id = $customsOffice->getId();
		$data->city = $customsOffice->getCity();
		return ( $data );
	}
	
}


?>